Hi Scott,
That all sounds like perfectly correct behavior. The JP5 inputs are very high input impedance (many megohms) with no pull down resistance. You must drive the signals for them to have any validity. They are 3.3V inputs diode clamped to the 3.3V power rail. There is a series resistance to avoid damage if shorted to the +5V. But they shouldn't be driven higher than 3.8V. 5V TTL Outputs are only required to drive above 2.8V. Most will not drive hard above 3.8V. Because of the way the I/O is designed in pairs, if driven above 3.8V some clamping current will leak to the opposite input.
SJH makes good points. The majority of RJ45 cables are not straight through so make sure you are really connected to the right pins. I don't think the pairing of the wires in the cable is of any use. All of the signals are single ended anyway. So pairing one signal with another is not likely to be any better or worse than any other.
With regard to noise pickup on I/O 42: KFLOP's inputs are very fast and can easily detect nanosecond spikes. A Ceramic Capacitor with very short leads (several inches) connected very near KFLOP between the input and KFLOP GND can usually filter out spikes. The right size will be needed to filter noise but not filter the pulse itself. It depends some on the thing driving the signal but 0.001uF might be a good value to start with. An Index pulse needs to be at least 180us to be reliably detected by a KFLOP User Program so there is large ratio between a real pulse and a noise spike.
I don't understand why the input was detected while it was jumper-ed to GND. Are you sure you were on the right pin? Were the wires long?
Here is a simple program to watch for glitches:
#include "KMotionDef.h"
// Simple check for Glitch on Input Pin
main()
{
while (!ReadBit(42)) ; // tight loop while input is low
printf("Input was high!!\n");
}
HTH
Regards
TK
Group: DynoMotion |
Message: 11549 |
From: Hardy Family |
Date: 5/21/2015 |
Subject: Re: Encoder Issue |
It's true that with single ended it should not matter which wire is used, but considering that each encoder (A and B output) will be referenced to the same ground (common at the encoder), it would be best to have the A,B on the same pair, so that ground differentials between different encoders do not cross-couple as strongly. I think using single-ended without single-point ground wiring is always a worry.
You got me slightly concerned about the 5V tolerant inputs, though. My design drives those rj45 inputs directly from a 26C32 style differential receiver. The cmos part is running from 5V, and that will drive the outputs pretty close to 5V. I haven't had any noticeable problems, but I would probably want to use 3.3V cmos in the future (if I can even find a diff receiver like that, with the usual +/-12V tolerance on the inputs). Regards, SJH | |